<html>
<head>
<script type="text/javascript">
function parseXML()
{
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
    }
  catch(e)
    {
    alert(e.message);
    return;
    }
  }
xmlDoc.async=false;
xmlDoc.load("note.xml");
document.getElementById("to").innerHTML=xmlDoc.getElementsByTagName("lat")[0].childNodes[0].nodeValue;
xmlDoc.getElementsByTagName("lat")[0].childNodes[0].nodeValue = 100;

var x = xmlDoc.getElementsByTagName('sighting');

var newel=xmlDoc.createElement('mark');
var newe2=xmlDoc.createElement('lat');
var newtext=xmlDoc.createTextNode('500');
newe2.appendChild(newtext);
newel.appendChild(newe2);
x[0].appendChild(newel);


xmlDoc.save("note.xml");

}
</script>
</head>

<body onload="parseXML()">
<p><b>Lat</b> <span id="to"></span><br />
</p>
</body>
</html>

